package com.snail.snailvr.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 下载信息抽象类
 */
public class TaskInfo implements Parcelable {

    private long taskId;
    private String taskName;
    //Video下载地址
    private String videoUri;
    private String desc;
    private String videoLabel;
    private long videoTotalSize;
    private int taskPercent;
    private long downloadedSize;
    private int downloadState;
    //Video存储路径
    private String videoLocalUri;
    private int reason;
    private int appId;
    public long getTaskId() {
        return taskId;
    }

    public void setTaskId(long taskId) {
        this.taskId = taskId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getVideoUri() {
        return videoUri;
    }

    public void setVideoUri(String videoUri) {
        this.videoUri = videoUri;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getVideoLabel() {
        return videoLabel;
    }

    public void setVideoLabel(String videoLabel) {
        this.videoLabel = videoLabel;
    }

    public long getVideoTotalSize() {
        return videoTotalSize;
    }

    public void setVideoTotalSize(long videoTotalSize) {
        this.videoTotalSize = videoTotalSize;
    }

    public int getTaskPercent() {
        return taskPercent;
    }

    public void setTaskPercent(int taskPercent) {
        this.taskPercent = taskPercent;
    }

    public long getDownloadedSize() {
        return downloadedSize;
    }

    public void setDownloadedSize(long downloadedSize) {
        this.downloadedSize = downloadedSize;
    }

    public int getDownloadState() {
        return downloadState;
    }

    public void setDownloadState(int downloadState) {
        this.downloadState = downloadState;
    }

    public String getVideoLocalUri() {
        return videoLocalUri;
    }

    public void setVideoLocalUri(String videoLocalUri) {
        this.videoLocalUri = videoLocalUri;
    }

    public int getReason() {
        return reason;
    }

    public void setReason(int reason) {
        this.reason = reason;
    }

    public int getAppId() {
        return appId;
    }

    public void setAppId(int appId) {
        this.appId = appId;
    }

    public TaskInfo() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.taskId);
        dest.writeString(this.taskName);
        dest.writeString(this.videoUri);
        dest.writeString(this.desc);
        dest.writeString(this.videoLabel);
        dest.writeLong(this.videoTotalSize);
        dest.writeInt(this.taskPercent);
        dest.writeLong(this.downloadedSize);
        dest.writeInt(this.downloadState);
        dest.writeString(this.videoLocalUri);
        dest.writeInt(this.reason);
        dest.writeInt(this.appId);
    }

    protected TaskInfo(Parcel in) {
        this.taskId = in.readLong();
        this.taskName = in.readString();
        this.videoUri = in.readString();
        this.desc = in.readString();
        this.videoLabel = in.readString();
        this.videoTotalSize = in.readLong();
        this.taskPercent = in.readInt();
        this.downloadedSize = in.readLong();
        this.downloadState = in.readInt();
        this.videoLocalUri = in.readString();
        this.reason = in.readInt();
        this.appId = in.readInt();
    }

    public static final Creator<TaskInfo> CREATOR = new Creator<TaskInfo>() {
        @Override
        public TaskInfo createFromParcel(Parcel source) {
            return new TaskInfo(source);
        }

        @Override
        public TaskInfo[] newArray(int size) {
            return new TaskInfo[size];
        }
    };
}
